// 策略接口
import $ajax from '../ajax'

// const baseUrl = process.env.NODE_ENV == 'development' ? 'http://cldevapi.senbowl.top/api' : 'https://clapi1.sysenbo.top/api'
const baseUrl = process.env.NODE_ENV == 'development' ? 'http://cldevapiold.senbowl.top/api' : 'https://clapi1.sysenbo.top/api'
const secretKey  = process.env.NODE_ENV == 'development' ? "QLSbv05ofg3zu9dx" : "K0UvAORcgqmCIkA3"

const addSecretKey = function(data) {
    data.secret_key = secretKey
    return data
}

// 获取自定义的广告素材数据
const adMaterialUrl = '/ad/material'

export default {
    getCustomadMaterial(data) {
        return $ajax.get(`${baseUrl}${adMaterialUrl}`, addSecretKey(data), '')
    },
}
